<!-- 回复表单默认隐藏 -->
<css file="__PUBLIC__/static/whoCare/layui/css/layui.css" />
<script src="__PUBLIC__/static/whoCare/Qplayer/js/jquery.min.js"></script>
<script src="__PUBLIC__/static/layer-2.4/layer.js"></script>

<div class="replycontainer" style="width: 90%;margin: 2% auto;">
    <form class="layui-form" action="{:U('Home/index/addMsg')}" id="replyForm">
        <input type="hidden" name="about_pid" value="{$about_id}">
        <div class="layui-form-item" >
            <textarea name="about_con" placeholder="请输入回复内容" class="layui-textarea" style="height: 75%;"></textarea>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-sm replyBtn">提交</button>
            <input type="reset" class="layui-btn layui-btn-sm" value="重置" />
        </div>
    </form>
</div>
<script>
    $(".replyBtn").click(function(){
        var data=$("#replyForm").serialize();
        var href=$("#replyForm").attr("action");
        $.post(href,data,function(res){
            if(res.status==1){
                layer.msg(res.info);
                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                setTimeout(function () {
                    window.parent.location.reload();
                    parent.layer.close(index); // 关闭layer
                },3000);
            }
            else{
                layer.msg(res.info);
            }
        });
        return false;
    });
</script>

